<script setup>

import Header from "../../components/HeaderVue.vue";
import {
  Document,
  Menu as IconMenu,
  Location,
  Setting, Position, Star, MessageBox,
} from '@element-plus/icons-vue'
import {ref} from "vue";
import {getAiJudgeAndRecommendBySynthesis} from "../../../api/user/user.js";
// 默认高亮
const defaultActive = ref("/student/space/information/comprehensive");
</script>

<template>
  <div class="common-layout">
    <el-container>
      <!--      顶部，放头像-->
      <el-header class="header-outer">
        <Header></Header>
      </el-header>
      <el-container class="inner-container">
        <!--        侧边，放导航栏-->
        <el-aside class="aside-outer">
            <el-menu
                :default-active="defaultActive"
                active-text-color="#000000"
                background-color="#409eff"
                text-color="#ffffff"
                :router='true'
            >
              <el-menu-item index="/student/space/information/comprehensive">
                <el-icon>
                  <setting/>
                </el-icon>
                <span>个人信息</span>
              </el-menu-item>

              <el-menu-item index="/student/space/inbox">
                <el-icon>
                  <MessageBox/>
                </el-icon>
                <span>收件箱</span>
              </el-menu-item>

              <el-menu-item index="/student/space/course">
                <el-icon>
                  <icon-menu/>
                </el-icon>
                <span>我的课程</span>
              </el-menu-item>

              <el-sub-menu index="1">
                <template #title>
                  <el-icon>
                    <Star/>
                  </el-icon>
                  <span>我的收藏</span>
                </template>
                <el-menu-item index="/student/space/collectionvideo">收藏视频</el-menu-item>
                <el-menu-item index="/student/space/collectionpractice">收藏题目</el-menu-item>
              </el-sub-menu>
              <el-sub-menu index="2">
                <template #title>
                  <el-icon>
                    <Notebook/>
                  </el-icon>
                  <span>历史记录</span>
                </template>
                <el-menu-item index="/student/space/historyVideo">视频记录</el-menu-item>
                <el-menu-item index="/student/space/historypractice">刷题记录</el-menu-item>
              </el-sub-menu>
            </el-menu>
        </el-aside>
        <!--主体，放个人信息-->
        <el-main class="main-card">
          <el-card class="card">
            <router-view></router-view>
          </el-card>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<style scoped lang="less">
.common-layout {
  background: -moz-linear-gradient(to bottom, #f3f5f8, #fff);
  background: linear-gradient(to bottom, #f3f5f8, #fff);
  position: relative;
  height: 100%;
  width: 100%;

  .header-outer {
    height: 100%;
    width: 100%;
    // 改变盒子背景 略灰一点
    background-color: #fff;
    // 改变外部盒子边界线便于区分
    border-bottom: 2px solid #eee;
    // 设置盒子底部阴影
    box-shadow: 0 2px 8px 0 rgba(7, 17, 27, 0.06);
  }

  .inner-container {
    position: relative;
    .aside-outer {
      width: 10.5%;
      position: absolute;
      left: 3%;
      top: 100%;
      background-color: #409eff;
      height: 85vh;
      border-radius: 10px;
    }

    .card {
      position: absolute;
      width: 83%;
      height: 85vh;
      top: 100%;
      right: 2%;
      border-radius: 10px;
    }
  }
}
</style>